import demo1.builder.OfoBikeBuilder;
import demo1.director.BikeDirector;
import demo1.model.Bike;
import demo2.Phone;
import org.junit.Test;

public class Client {

    @Test
    public void demo1() {
        //创建指挥者对象
        BikeDirector director = new BikeDirector(new OfoBikeBuilder());
        Bike bike = director.construct();
        System.out.println(bike);
    }

    @Test
    public void demo2()  {
        Phone phone = new Phone.Builder()
                .cpu("骁龙865")
                .screen("三星屏幕")
                .memory("金士顿内存")
                .mainBoard("不知名主板").build();

        System.out.println(phone);
    }
}
